<template>
  <div class="box">
      <slot name="pic"></slot>
    <div class="text">
      <slot name="p1"></slot>
      <slot name="p2"></slot>
      <slot name="link"></slot>
    </div>
  </div>
</template>

<script>
export default {};
</script>

<style lang="scss" scoped>
.box {
  width: 430px;
  height: 430px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  margin-top: 22px;
  img {
    width: 430px;
    transform: scale(1);
    transition: all 0.5s linear;
  }
  .text {
    width: 240px;
    height: 100px;
    text-align: center;
    position: absolute;
    left: 95px;
    bottom: 10px;
    color: #fff;
    .p1 {
      margin: 8px 0;
      font-size: 18px;
      transform: translateY(50px);
      transition: all 0.2s linear;
    }
    .p2 {
      opacity: 0;
      font-size: 15px;
      transform: translateY(30px);
      transition: all 0.3s linear;
    }
    a {
      opacity: 0;
      display: block;
      margin-top: 8px;
      font-size: 15px;
      color: #fff;
      transform: translateY(30px);
      transition: all 0.4s linear;
    }
  }
  &:hover img {
    transform: scale(1.2);
  }
  &:hover .p1 {
    opacity: 1;
    transform: translateY(0px);
  }
  &:hover .p2 {
    opacity: 1;
    transform: translateY(0px);
  }
  &:hover a {
    opacity: 1;
    transform: translateY(0px);
  }
}
</style>